import json

from ronglian_sms_sdk import SmsSDK

accId = '2c94811c946f6bfb019733b4f35407e2'
accToken = 'fd41e93803034c6aa8a8c34b45e0b777'
appId = '2c94811c946f6bfb019733b4f4ea07e9'

def send_message(phone,code):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = phone
    datas = (code,)
    resp = sdk.sendMessage(tid, mobile, datas)
    return json.loads(resp)